<h1>Course Listing</h1>

<table style='text-align:center'>
  <tr>
    <th>Name</th>
    <th>Number of TAs Required</th>
  </tr>

<% courses.each do |course| %>
  <tr>
    <td><%=h course.name %></td>
    <td><%=h course.required_ta %></td>
    <td><%= link_to 'Show', {
		:controller => 'courses', 
		:action => 'show', 
		:semester_term => course.term,
		:course_name => course.name} %></td>
    <td><%= link_to 'Edit', {
		:controller => 'courses', 
		:action => 'edit', 
		:semester_term => course.term,
		:course_name => course.name} %></td>
    <td><%= link_to 'Destroy', course, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />
